{extend name="layout/main" /}

{block name="header"}

{/block}

{block name="content"}
<section class="panel">
    <header class="panel-heading">
        <h4>运行记录</h4>
    </header>
    <div class="panel-body" style="padding-bottom: 50px">
        <form class="form-horizontal" action="">
            <div class="form-group">
                <div class="col-xs-3">
                    <select name="type" class="form-control">
                        <option value="0">全部分类</option>
                        {foreach $cate as $key=>$item}
                        <option {if $Request.get.size == $item.size}selected{/if} value="{$item.size}">{$item.name}</option>
                        {/foreach}
                    </select>
                </div>
                <button type="submit" class="btn btn-color">搜索</button>
                <!--<button type="button" class="btn btn-success" id="export">导出</button>-->
                <!--<a type="button" href="{:url('admin/Excelexport/walletLogList')}" class="btn btn-info">导出</a>-->

            </div>
        </form>
        <table class="table table-bordered table-striped no-margin">
            <thead>
            <tr>
                <th class="text-center">id</th>
                <th class="text-center">房间</th>
                <th class="text-center">局数</th>
                <th class="text-center">状态</th>
                <th class="text-center">时间</th>
            </tr>
            </thead>
            <tbody>
            {if !empty($list)}
            {foreach $list as $entity}
            <tr>
                <form class="form-horizontal" method="post" onsubmit="return false" role="form">
                    <td class="text-center">{$entity->id}</td>
                    <td class="text-center">{$entity->room_name}</td>
                    <td class="text-center">{$entity->period}</td>
                    <td class="text-center">{$entity->num} </td>
                    <td class="text-center">{$entity->create_time|date="Y-m-d H:i:s"}</td>
                </form>
            </tr>
            {/foreach}
            {else /}
            <tr class="text-center">
                <td colspan="7">暂无数据</td>
            </tr>
            {/if}
            </tbody>
        </table>
        <div class="page">
            {:htmlspecialchars_decode($list->render())}
        </div>
    </div>
</section>
{/block}


{block name="footer"}
<form action="{:url('admin/user/exportfzBncLog')}" id="exportForm">
    <input type="hidden" name="type" id="e_type">
    <input type="hidden" name="keyword" id="e_keyword">
</form>
<script>
    //导出会员信息
    $("#export").click(function(){
        var keyword = $("#keyword").val();
        var type = $("#type").val();
        $('#e_keyword').val(keyword);
        $('#e_type').val(type);
        $("#exportForm").submit();
    })
</script>
{/block}
